#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>

#define PATHNAME  "./myfifo"

int main()
{

    int fd = open(PATHNAME,O_WRONLY);

    char buffer[1024];

    while(1)
    {
        memset(buffer,0,sizeof(buffer));
        scanf("%s",buffer);
        write(fd,buffer,strlen(buffer));
    }

    close(fd);
    return 0;
}